package com.timmy.mvpdemo.model;

import android.os.Handler;

import com.timmy.mvpdemo.interfa.TestCallback;

/**
 * Created by Timmy on 2017/12/10.
 */

public class RequestMode {

    private Handler mHandler = new Handler();

    private static final int POSTDELAYTIME = 1000;

    public void request(final TestCallback callback) {
        mHandler.postDelayed(new Runnable() {
            @Override
            public void run() {
                callback.onSuccess();
            }
        }, POSTDELAYTIME);
    }

    /**
     * 取消网络请求
     */
    public void interruptHttp() {

    }
}
